#include"Comm.hpp"

int main(){
    Shm cliShm(SHM_SIZE,IPC_CREAT|0666,SHM_W);
    char* cliAddr=(char*)cliShm.commShm();

    FIFOSig cliSig("w");
    while(true){
        ssize_t s=read(0,cliAddr,SHM_SIZE-1);//算进了回车
        if(s>0){
        cliAddr[s-1]=0;
        cliSig.sig();
        if(!strcmp(cliAddr,"quit"))
            break;
        }
    }

    cliShm.destoryShm();
    return 0;
}